package com.cungmua.app.model.request;

import com.cungmua.app.utils.AppUtils;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Created by kelvin.nguyen on 7/1/14.
 */
public class BonusRequest extends  AuthenticatedRequest {
    private int userId;
    private String bonusCode;

    public BonusRequest(String deviceId, String token) {
        super(deviceId, token);
    }

    @JsonProperty("UserId")
    public int getUserId() {
        return userId;
    }

    public void setBonusCode(String bonusCode) {
        this.bonusCode = bonusCode;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @JsonProperty("BonusCode")
    public String getBonusCode() {
        return bonusCode;
    }

    @Override
    public String getSign() {
        return AppUtils.MD5(String.valueOf(getUserId()) + getVersion() + getDeviceId() + getToken());
    }
}
